<?php
	global $SSO, $Security, $AppID, $User, $DB;
	//Check to see if there is a valid session 
	$SessionInfo = $SSO->isValidSession("index.php?action=login", $SSO->getSessionInformation());	
		
	//Check to see if the user has rights to be on LivingWeb
	$PageRights = array('ADMIN','USER');
	$UserRoles = $Security->ValidateUser($SessionInfo['username'], $AppID, $PageRights, 1);
	
	//Grab the user info
	$UserInfo = $User->GetUserInfo($SessionInfo['username']);	
	
	if(isset($_POST['txtDisplay']) && isset($_POST['txtLink']) && isset($_POST['txtLinkOrder']) && isset($_GET['div_code']))
	{
		$menuObj = new menu;
		$menuObj->updateMenuItem($_POST['txtDisplay'],$_POST['txtLink'],null,$_POST['txtLinkOrder'],'D',$_GET['div_code']);
	}

	header("Location: index.php?action=menu_by_div&div_code=" . $_GET['div_code']);
?>
 
 
